PartMaker is an application that generates ready-to-go OpenDoc part editor source code (and projects, and makefiles too) for you. Think of it as stationery for developing editors. There are a lot of pieces to put together to build a part editor — source files, .xih files, 'nmap' resources, you name it — and PartMaker makes sure they're all set up before you start coding. In particular, changing the name of a part editor is a tricky operation and not to be attempted by the faint of heart; PartMaker knows how to do it properly.
Using PartMaker.
Double-click the PartMaker configuration document of your choice — this determines what kind of part editor source code will be created. We are releasing PartMaker documents for several of the supported Sample Code parts, and we recommend them as a starting point for for your parts, as they are official and robust implementations of various aspects of OpenDoc development. Whichever configuration document you open, the PartMaker splash screen will display more information telling you what you are about to build.
If the splash screen shows a pop-up menu, choose a part to build from the ones listed in the menu. None of the supported Sample Code configuration documents do this, but you may come across others that do.
Enter a System Object Model™ (SOM) class name for your part. This should have the same form as a C or C++ identifier — only alphanumerics and underscores, please. This name will be used to rename the C++ class, rename some files, change the 'nmap' & 'cfrg' resources, and make various internal name changes to the project files.
Enter a company name for your part. The company name will identify all parts from your company. Your company name will be used in C++ identifiers, so it must consist only of alphanumerics and underscores.
Click the “Create Part” button. You'll be prompted for a location to create the development folder for the code (it says it'll create a file, but it's really creating a folder.)
Quit PartMaker.
Building Your Part.
You must first have installed the development environment of your choice, plus the appropriate environment additions (from the Environment Additions folder and the Development Additions folder inside the Sample Code folder). If you haven't already done so, please find the Development folder and follow the directions there.
Once you've got a development environment installed and have created a part folder with PartMaker, you're ready to build your part. Check the Sample Code folder for instructions on building the sample part your part is based on, and build yours as directed.
If you are building a part with the Symantec Project Manager environment, you'll need to use the "Build Symantec Project.se" script you'll find in the folder PartMaker produces. This AppleScript script will create the Symantec Project Manager project document for your part.
To use the script, you must first have AppleScript and the Finder Scripting Extension installed. Double-click on the "Build Symantec Project.se" script, and when it opens, click on the Run button. You'll be asked to locate your copy of Symantec Project Manager, and then to choose a name and location for your project document. We recommend that you use the default name and put the project document in the same folder as the script.
Running Your Part.
To install the part editor, copy it into the Editors folder in your System folder. Alternatively, you may copy it to an "Editors" folder at the root of any mounted volume. These are the two places where all OpenDoc part editors reside. If you plan on doing any debugging, copy the .xSYM file there too. (Hint: you can put an alias of the editor into the Editors folder instead. This way you can keep recompiling the editor without having to re-install it every time. Note however, that cross-volume aliases are not allowed, see the TechNotes for more info.)
Before you can use the part editor, you have to create a stationery file containing a part instance. To do so, drop the part editor onto the “OpenDoc™” application in the OpenDoc folder. After some whirring and clicking, the launcher (that's what we call that application) will quit and a stationery pad called“PartName VersionNumber” will be created in the Stationery folder at the root of your startup/boot volume. You can now move that stationery anywhere you like. Please note that you must install the editor in an Editors folder before you can create stationery.
You can double-click the stationery pad, which will create a new document (in the same folder as the stationery) with your part as the root. Or you can open another document whose root is a container (such as the DrawEditor sample part) and drag your part’s stationery file into the container, which will instantiate a new part. The latter is generally a more interesting use of OpenDoc's technology.